using System;
using System.Collections.Generic;
using System.Text;

namespace IGlobalist.Cms.Model
{
    [Serializable]
    public class ResourceFile : CmsObject, IResourceFile
    {

        #region IResourse Members
        private ResourceType _Type = ResourceType.Folder;
        public ResourceType Type
        {
            get
            {
                return (ResourceType)Enum.Parse(typeof(ResourceType), GetExtPropertyValue("Type").ToString());
            }
            set
            {
                SetExtPropertyValue("Type", value);

            }
        }

        public long Size
        {
            get
            {
                return Convert.ToInt64(GetExtPropertyValue("Size"));
            }
            set
            {
                SetExtPropertyValue("Size", value);

            }
        }

        public long FolderID
        {
            get
            {
                return Convert.ToInt64(GetExtPropertyValue("FolderID"));
            }
            set
            {
                SetExtPropertyValue("FolderID", value);

            }
        }
        

        public DateTime UploadDate
        {
            get
            {
                return Convert.ToDateTime(GetExtPropertyValue("UploadDate"));
            }
            set
            {
                SetExtPropertyValue("UploadDate", value);

            }
        }

        public string Extention
        {
            get
            {
                return (string)GetExtPropertyValue("Extention");
            }
            set
            {
                SetExtPropertyValue("Extention", value);

            }
        }

        #endregion

        #region IXml Members

        public bool FromXml(string xml)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public string ToXmlString()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion

        #region ICmsObject Members


        public bool FromCmsObject(CmsObject obj)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion

        #region IResourceFile Members

       

        #endregion
    }
}
